package com.erp.erp_servers.Purchase.imp;

import com.erp.erp_dao.Purchase.IPurchaseFileDAO;
import com.erp.erp_entitys.Blueprint.BlueprintFileEntity;
import com.erp.erp_entitys.Purchase.PurchaseFile;
import com.erp.erp_servers.Purchase.IPurchaseFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ImpPurchaseFileService implements IPurchaseFileService {

    @Autowired
    private IPurchaseFileDAO purchaseFileDAO;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return purchaseFileDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(PurchaseFile record) {
        return purchaseFileDAO.insert(record);
    }

    @Override
    public int insertSelective(PurchaseFile record) {
        return purchaseFileDAO.insertSelective(record);
    }

    @Override
    public PurchaseFile selectByPrimaryKey(Integer id) {
        return purchaseFileDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(PurchaseFile record) {
        return purchaseFileDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(PurchaseFile record) {
        return purchaseFileDAO.updateByPrimaryKey(record);
    }

    @Override
    public List<PurchaseFile> selectFileByPuId(Integer puId) {
        List<PurchaseFile> purchaseFiles = purchaseFileDAO.selectFileByPuId(puId);
        return purchaseFiles;
    }

    @Override
    public int deleteByIdList(List<Integer> idList) {
        return purchaseFileDAO.deleteByIdList(idList);
    }

    @Override
    public List<BlueprintFileEntity> selectBlueprintFileByCode(Map<String, String> map) {
        return purchaseFileDAO.selectBlueprintFileByCode(map);
    }
}
